package cn.iocoder.yudao.module.scrm.controller.admin.customer.vo;

import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - SCRM客户分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class CustomerPageReqVO extends PageParam {

    private List<Long> ids;

    @Schema(description = "客户名称", example = "李四")
    private String name;

    @Schema(description = "企业")
    private String enterprise;

    @Schema(description = "电话")
    private String phone;

    @Schema(description = "线索来源")
    private String clueSource;

    @Schema(description = "获客时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] customerSourceTime;

    @Schema(description = "客户来源")
    private String customerSource;

    @Schema(description = "素材来源")
    private String materialSource;

    @Schema(description = "信息来源")
    private String infoSource;

    @Schema(description = "备注", example = "随便")
    private String remark;

    @Schema(description = "扩展")
    private String extend;

    @Schema(description = "跟进状态", example = "1")
    private Boolean followUpStatus;

    @Schema(description = "最后跟进时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] contactLastTime;

    @Schema(description = "最后跟进内容")
    private String contactLastContent;

    @Schema(description = "下次联系时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] contactNextTime;

    @Schema(description = "负责人的用户编号", example = "15447")
    private List<Long> ownerUserId;

    @Schema(description = "app端负责人的用户编号wxIds", example = "15447")
    private List<String> ownerUserIdString;

    @Schema(description = "成为负责人的时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] ownerTime;

    @Schema(description = "成交状态", example = "1")
    private Boolean dealStatus;

    @Schema(description = "锁定状态", example = "1")
    private Boolean lockStatus;

    @Schema(description = "客户等级，对应字典 SCRM_CUSTOMER_LEVEL")
    private Integer level;

    @Schema(description = "状态", example = "2")
    private Integer status;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

    //@DiffLogField(name = "客户质量->客户意向", function = ScrmClueIdeaFunction.NAME)
    //@DictFormat(SCRM_CLUE_IDEA)
    @Schema(description = "客户质量->客户意向  scrm_clue_idea")
    //@NotEmpty(message = "客户意向不能为空")
    private String clientQuality;

    @Schema(description = "协作人")
    private Long assistants;

    @Schema(description = "是否为公海数据", requiredMode = Schema.RequiredMode.REQUIRED, example = "false")
    private Boolean pool = false; // null 则表示为不是公海数据

    @Schema(description = "客户阶段", example = "新客户 1")
    private String customerStage;

    @Schema(description = "年营业额", example = "A(1000亿以上) 1")
    private String yearTurnover;

    @Schema(description = "分公司", example = "分公司 中创")
    private String sonCompany;

    @Schema(description = "回款方式,关联枚举CrmReceivableReturnTypeEnum", example = "1")
    private String receivableMethod;

    @Schema(description = "职位", example = "职位")
    private String position;

    @Schema(description = "身份证号", example = "身份证号")
    private String idCard;

    @Schema(description = "邀约人", example = "邀约人")
    private String inviter;

    @Schema(description = "回款金额", example = "6.66")
    private BigDecimal receivablePrice;

    @Schema(description = "回款时间", example = "2020-02-02 02:02:02")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] receivableTime;

    @Schema(description = "峰会是否签到-状态值-显示加上Name", example = "1")
    private Integer summitStatus;

    @Schema(description = "峰会组别", example = "峰会组别")
    private String summitGroup;

    @Schema(description = "员工人数", example = "员工人数")
    private String numberPeople;

    @Schema(description = "需求及痛点", example = "需求及痛点")
    private String quantityPain;

    @Schema(description = "是否为负责人查询", example = "true")
    private Boolean isOwner;

    @Schema(description = "是pc端true   是app端false", example = "true")
    //@NotNull(message = "appOrPcType不能为空")
    private Boolean appOrPcType = false; //app端为true将wxId转换成id


}